﻿<?php
$this->breadcrumbs=array(
	'Experience',
);?>

<script type="text/javascript">
	$(document).ready(function(){

		$(".plus").hide();
		$(".addSlideToggle").click(function(){
			if($(".addProjDiv").is(":visible")) {
			$(this).children(".minus").hide();
			$(this).children(".plus").show();
		}
		else {
			$(this).children(".plus").hide();
			$(this).children(".minus").show();
		}
		$(".addProjDiv").slideToggle("slow");
		});

	});
</script>
<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/userdetail.css" />



             	<div class="padding10"></div>
	                <!-- Begin rightSidebar -->
	                <div id="contentWrapper">
	                	<!-- Begin rightWrapper -->
	                	<div id="rightWrapper">
	                	<div id= "user_add_project">
							<div class = "user_pname" >
								<h3>
									<span class="addSlideToggle" >
										<img class="minus" title ="thu gọn" src="<?php echo Html::imageUrl("minus.gif");?>" ></img>
										<img class="plus" title ="mở rộng" src="<?php echo Html::imageUrl("plus.gif");?>" ></img>
									</span>
									Thêm Project
								</h3>
							</div>
	                		<?php 
									$form = $this->beginWidget(
								 		'CActiveForm',array(
								 			'id'=>'add-exp',
								 			'enableAjaxValidation'=>true,
								 	));
									?>
								<div class ="addProjDiv">		
								
								<div class = "up_addpr" >
									
									<span class ="user_label">Tên dự án</span> 
									<?php echo $form->textField($OutsideProject,'outside_project_name');?>
									<?php echo $form->error($OutsideProject,'outside_project_name',array('class'=>'formError'));?>
								</div>
								<div class = "up_addpr"><span class ="user_label">Ngôn Ngữ</span>
									<?php echo $form->dropDownList($OutsideProject,'outside_project_language_id',$ProgList )?>
									
								</div>
								
								<div class = "up_addpr"><span class="user_label" >Mô tả công việc:</span>
									<?php echo $form->textArea($OutsideProject,'outside_project_assigment_description',array('cols'=>40,'rows'=>6));?>
									<?php echo $form->error($OutsideProject,'outside_project_assigment_description',array('class'=>'formError'));?>
								</div>
								<div class = "up_addpr" id ="up_addtime"><span class ="user_label">Thời gian thực hiện:		</span>					
									<?php echo $form->textField($OutsideProject,'outside_project_excution_time');?> ngày
									<?php echo $form->error($OutsideProject,'outside_project_excution_time',array('class'=>'formError'));?>
								</div>
								<div class ="up_addpr" id ="up_addmem"><span class="user_label">Nhân công:</span>
								<?php echo $form->textField($OutsideProject,'outside_project_size');?> người
									<?php echo $form->error($OutsideProject,'outside_project_size',array('class'=>'formError'));?>
								</div>
								<div class = "up_addpr"><span class = "user_label">Vị trí:</span>
									<?php echo $form->dropDownList($OutsideProject,'outside_project_user_position',
									  $OutsideProject->getPositionList());?>
								</div>	
						   <?php echo Chtml::ajaxSubmitButton('Thêm', $this->createUrl('add',array('uid'=>$uid)),
								array(
									'beforeSend'=>'function() {
										$("#show_project").addClass("loading");
									}',
									'complete'=>'function(){
										$("#show_project").removeClass("loading");
									}',
									'update'=>"#show_project",
									),
									array(
										'id'=>'addProject',
									)
									);?>	
								 	<?php $this->endWidget();?>	
								 
								</div> 
						</div>
						
					<div id="show_project">	
					<?php $this->renderPartial('_outsideProjectList',array('OutsideProjectList'=>$OutsideProjectList,
											   'uid'=>$uid));?>
					</div>
                	</div>
                	<!-- End rightWrapper -->
               
                </div>	
                <!-- End rightSidebar -->
				<!-- Edit project -->
			